select GHRYEAR.*,formmain_0118.id from GHRYEAR
left outer join formmain_0118 on trim(GHRYEAR.EMPNO)=trim(formmain_0118.field0001) and trim(GHRYEAR.YEAR)=trim(formmain_0118.field0006)
where formmain_0118.ID is null